﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SkeletonNET.Common.Setup;
using Microsoft.Practices.ServiceLocation;
using Microsoft.Practices.Unity;
using SkeletonNET.Crud.Repository;
using SkeletonNET.Base.Crud.CrudManager;
using SkeletonNET.Crud.KeyCache;

namespace Skeleton.Base.Data
{
    public class Setup : ISetup
    {
        void ISetup.Setup()
        {
            ServiceLocator.Current
                .GetInstance<IUnityContainer>()
                .RegisterType(typeof(IRepository<>), typeof(Repository<>))
                .RegisterType(typeof(ICrudManager<>), typeof(CrudManager<>))
                .RegisterType<IEntityKeyCache, EntityKeyCache>();
        }
    }
}
